<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>

<body>
{[foreach item=aa from=$list]} 
{[$aa.title]}
<table border="1" cellpadding="2" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
	<tr align="center">
		<th>序号</th>
		<th>流水号</th>
		<th>产品</th>

		<th>名称</th>
		<th>规格</th>

		<th>单位</th>
		<th>单价</th>
		<th>数量</th>
		<th>小计</th>
		<th>备注</th>

		<th>收料人</th>
		<th>状态</th>
		<th>创建时间</th>
		<th>更新时间</th>
	</tr>
	{[assign var="t1" value="0"]}
	{[foreach name=outer key=key item=item from=$aa.data]} 	
	{[assign var="no" value="`$key+1`"]} 
	{[assign var="total" value="`$item.price*$item.amount`"]}
	{[assign var="t1" value="`$t1+$total`"]}
	<tr align="center">
		<td>{[$no]}</td>
		<td>{[$item.id]}</td>
		<td>{[$item.mold_t]}</td>
		
		<td>{[$item.name]}</td>
		<td>{[$item.standard|truncate:21:"...":true]}</td>

		<td>{[$item.unit]}</td>
		<td>{[$item.price|string_price]}</td>
		<td>{[$item.amount|money]}</td>
		<td>{[$total|money]}</td>

		<td>{[$item.content|truncate:21:"...":true]}</td>
			
		<td>{[$item.emp_t]}</td>	
		<td>{[$item.status_t]}</td>
		<td>{[$item.createtime]}</td>
		<td>{[$item.modifytime]}</td>
	</tr>
	{[/foreach]}
	<tr align="center">
		<td colspan="8"></td>
		<td>{[$t1|money]}</td>
		<td colspan="5"></td>
	</tr>
</table>
{[/foreach]}

{[foreach item=aa from=$result]} 
{[$aa.title]}
<table border="1" cellpadding="2" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
	<tr align="center">
		<th>序号</th>
		<th>产品</th>
		<th>金额</th>
		<th>百分比</th>
	</tr>
	{[foreach name=outer key=key item=item from=$aa.data]} 
	{[assign var="no" value="`$key+1`"]}
	<tr align="center">
		<td>{[$no]}</td>
		<td>{[$item.a]}</td>
		<td>{[$item.c|money]}</td>
		<td>{[$item.p]}</td>
	</tr>
	{[/foreach]}
	<tr align="center">
		<td></td>
		<td>总数</td>
		<td>{[$aa.total|money]}</td>
		<td></td>
	</tr>
</table>
<br />
{[/foreach]}

{[include file="_tj.tpl"]}
</body>
</html>